<!DOCTYPE HTML>
<html lang="en" class="light" dir="ltr">
    <head>
        <!-- Book generated using mdBook -->
        <meta charset="UTF-8">
        <title>NETCONF over SSH (RFC6242) - Netop Document</title>


        <!-- Custom HTML head -->
        
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="theme-color" content="#ffffff">

        <link rel="icon" href="../favicon.svg">
        <link rel="shortcut icon" href="../favicon.png">
        <link rel="stylesheet" href="../css/variables.css">
        <link rel="stylesheet" href="../css/general.css">
        <link rel="stylesheet" href="../css/chrome.css">
        <link rel="stylesheet" href="../css/print.css" media="print">

        <!-- Fonts -->
        <link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
        <link rel="stylesheet" href="../fonts/fonts.css">

        <!-- Highlight.js Stylesheets -->
        <link rel="stylesheet" href="../highlight.css">
        <link rel="stylesheet" href="../tomorrow-night.css">
        <link rel="stylesheet" href="../ayu-highlight.css">

        <!-- Custom theme stylesheets -->

    </head>
    <body class="sidebar-visible no-js">
    <div id="body-container">
        <!-- Provide site root to javascript -->
        <script>
            var path_to_root = "../";
            var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
        </script>

        <!-- Work around some values being stored in localStorage wrapped in quotes -->
        <script>
            try {
                var theme = localStorage.getItem('mdbook-theme');
                var sidebar = localStorage.getItem('mdbook-sidebar');

                if (theme.startsWith('"') && theme.endsWith('"')) {
                    localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
                }

                if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
                    localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
                }
            } catch (e) { }
        </script>

        <!-- Set the theme before any content is loaded, prevents flash -->
        <script>
            var theme;
            try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
            if (theme === null || theme === undefined) { theme = default_theme; }
            var html = document.querySelector('html');
            html.classList.remove('light')
            html.classList.add(theme);
            var body = document.querySelector('body');
            body.classList.remove('no-js')
            body.classList.add('js');
        </script>

        <input type="checkbox" id="sidebar-toggle-anchor" class="hidden">

        <!-- Hide / unhide sidebar before it is displayed -->
        <script>
            var body = document.querySelector('body');
            var sidebar = null;
            var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
            if (document.body.clientWidth >= 1080) {
                try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
                sidebar = sidebar || 'visible';
            } else {
                sidebar = 'hidden';
            }
            sidebar_toggle.checked = sidebar === 'visible';
            body.classList.remove('sidebar-visible');
            body.classList.add("sidebar-" + sidebar);
        </script>

        <nav id="sidebar" class="sidebar" aria-label="Table of contents">
            <div class="sidebar-scrollbox">
                <ol class="chapter"><li class="chapter-item expanded "><a href="../index.html"><strong aria-hidden="true">1.</strong> 概览</a></li><li class="chapter-item expanded "><a href="../addons/index.html"><strong aria-hidden="true">2.</strong> 附录</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../addons/rfc8071.html"><strong aria-hidden="true">2.1.</strong> NETCONF Call Home (RFC8071)</a></li><li class="chapter-item expanded "><a href="../addons/rfc4742.html"><strong aria-hidden="true">2.2.</strong> NETCONF over SSH (RFC4742)</a></li><li class="chapter-item expanded "><a href="../addons/rfc6242.html" class="active"><strong aria-hidden="true">2.3.</strong> NETCONF over SSH (RFC6242)</a></li><li class="chapter-item expanded "><a href="../addons/rfc4741.html"><strong aria-hidden="true">2.4.</strong> NETCONF Protocol (RFC4741)</a></li></ol></li></ol>
            </div>
            <div id="sidebar-resize-handle" class="sidebar-resize-handle">
                <div class="sidebar-resize-indicator"></div>
            </div>
        </nav>

        <!-- Track and set sidebar scroll position -->
        <script>
            var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
            sidebarScrollbox.addEventListener('click', function(e) {
                if (e.target.tagName === 'A') {
                    sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
                }
            }, { passive: true });
            var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
            sessionStorage.removeItem('sidebar-scroll');
            if (sidebarScrollTop) {
                // preserve sidebar scroll position when navigating via links within sidebar
                sidebarScrollbox.scrollTop = sidebarScrollTop;
            } else {
                // scroll sidebar to current active section when navigating via "next/previous chapter" buttons
                var activeSection = document.querySelector('#sidebar .active');
                if (activeSection) {
                    activeSection.scrollIntoView({ block: 'center' });
                }
            }
        </script>

        <div id="page-wrapper" class="page-wrapper">

            <div class="page">
                                <div id="menu-bar-hover-placeholder"></div>
                <div id="menu-bar" class="menu-bar sticky">
                    <div class="left-buttons">
                        <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
                            <i class="fa fa-bars"></i>
                        </label>
                        <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
                            <i class="fa fa-paint-brush"></i>
                        </button>
                        <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
                            <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
                            <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
                            <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
                            <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
                            <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
                        </ul>
                        <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>

                    <h1 class="menu-title">Netop Document</h1>

                    <div class="right-buttons">
                        <a href="../print.html" title="Print this book" aria-label="Print this book">
                            <i id="print-button" class="fa fa-print"></i>
                        </a>

                    </div>
                </div>

                <div id="search-wrapper" class="hidden">
                    <form id="searchbar-outer" class="searchbar-outer">
                        <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
                    </form>
                    <div id="searchresults-outer" class="searchresults-outer hidden">
                        <div id="searchresults-header" class="searchresults-header"></div>
                        <ul id="searchresults">
                        </ul>
                    </div>
                </div>

                <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
                <script>
                    document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
                    document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
                    Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
                        link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
                    });
                </script>

                <div id="content" class="content">
                    <main>
                        <p>Internet Engineering Task Force (IETF)                      M. Wasserman
Request for Comments: 6242                        Painless Security, LLC
Obsoletes: 4742                                                June 2011
Category: Standards Track
ISSN: 2070-1721</p>
<pre><code>       Using the NETCONF Protocol over Secure Shell (SSH)
</code></pre>
<p>Abstract</p>
<p>This document describes a method for invoking and running the Network
Configuration Protocol (NETCONF) within a Secure Shell (SSH) session
as an SSH subsystem.  This document obsoletes RFC 4742.</p>
<p>Status of This Memo</p>
<p>This is an Internet Standards Track document.</p>
<p>This document is a product of the Internet Engineering Task Force
(IETF).  It represents the consensus of the IETF community.  It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG).  Further information on
Internet Standards is available in Section 2 of RFC 5741.</p>
<p>Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc6242.</p>
<p>Copyright Notice</p>
<p>Copyright (c) 2011 IETF Trust and the persons identified as the
document authors.  All rights reserved.</p>
<p>This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document.  Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.  Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.</p>
<p>Wasserman                    Standards Track                    [Page 1]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>Table of Contents</p>
<ol>
<li>
<p>Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2</p>
</li>
<li>
<p>Requirements Terminology . . . . . . . . . . . . . . . . . . .  2</p>
</li>
<li>
<p>Starting NETCONF over SSH  . . . . . . . . . . . . . . . . . .  2
3.1.  Capabilities Exchange  . . . . . . . . . . . . . . . . . .  3</p>
</li>
<li>
<p>Using NETCONF over SSH . . . . . . . . . . . . . . . . . . . .  4
4.1.  Framing Protocol . . . . . . . . . . . . . . . . . . . . .  5
4.2.  Chunked Framing Mechanism  . . . . . . . . . . . . . . . .  5
4.3.  End-of-Message Framing Mechanism . . . . . . . . . . . . .  7</p>
</li>
<li>
<p>Exiting the NETCONF Subsystem  . . . . . . . . . . . . . . . .  8</p>
</li>
<li>
<p>Security Considerations  . . . . . . . . . . . . . . . . . . .  8</p>
</li>
<li>
<p>IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  9</p>
</li>
<li>
<p>Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10</p>
</li>
<li>
<p>References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
9.1.  Normative References . . . . . . . . . . . . . . . . . . . 10
9.2.  Informative References . . . . . . . . . . . . . . . . . . 10
Appendix A.  Changes from RFC 4742 . . . . . . . . . . . . . . . . 11</p>
</li>
<li>
<p>Introduction</p>
</li>
</ol>
<p>The NETCONF protocol [RFC6241] is an XML-based protocol used to
manage the configuration of networking equipment.  NETCONF is defined
to be session-layer and transport independent, allowing mappings to
be defined for multiple session-layer or transport protocols.  This
document defines how NETCONF can be used within a Secure Shell (SSH)
session, using the SSH connection protocol [RFC4254] over the SSH
transport protocol [RFC4253].  This mapping will allow NETCONF to be
executed from a secure shell session by a user or application.</p>
<p>Although this document gives specific examples of how NETCONF
messages are sent over an SSH connection, use of this transport is
not restricted to the messages shown in the examples below.  This
transport can be used for any NETCONF message.</p>
<ol start="2">
<li>Requirements Terminology</li>
</ol>
<p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].</p>
<ol start="3">
<li>Starting NETCONF over SSH</li>
</ol>
<p>To run NETCONF over SSH, the SSH client will first establish an SSH
transport connection using the SSH transport protocol, and the SSH
client and SSH server will exchange keys for message integrity and
encryption.  The SSH client will then invoke the "ssh-userauth"
service to authenticate the user, as described in the SSH</p>
<p>Wasserman                    Standards Track                    [Page 2]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>authentication protocol [RFC4252].  Once the user has been
successfully authenticated, the SSH client will invoke the
"ssh-connection" service, also known as the SSH connection protocol.</p>
<p>The username provided by the SSH implementation will be made
available to the NETCONF message layer as the NETCONF username
without modification.  If the username does not comply to the NETCONF
requirements on usernames [RFC6241], i.e., the username is not
representable in XML, the SSH session MUST be dropped.  Any
transformations applied to the authenticated identity of the SSH
client made by the SSH server (e.g., via authentication services or
mappings to system accounts) are outside the scope of this document.</p>
<p>After the ssh-connection service is established, the SSH client will
open a channel of type "session", which will result in an SSH
session.</p>
<p>Once the SSH session has been established, the NETCONF client will
invoke NETCONF as an SSH subsystem called "netconf".  Subsystem
support is a feature of SSH version 2 (SSHv2) and is not included in
SSHv1.  Running NETCONF as an SSH subsystem avoids the need for the
script to recognize shell prompts or skip over extraneous
information, such as a system message that is sent at shell start-up.</p>
<p>In order to allow NETCONF traffic to be easily identified and
filtered by firewalls and other network devices, NETCONF servers MUST
default to providing access to the "netconf" SSH subsystem only when
the SSH session is established using the IANA-assigned TCP port 830.
Servers SHOULD be configurable to allow access to the netconf SSH
subsystem over other ports.</p>
<p>A user (or application) could use the following command line to
invoke NETCONF as an SSH subsystem on the IANA-assigned port:</p>
<p>[user@client]$ ssh -s server.example.org -p 830 netconf</p>
<p>Note that the -s option causes the command ("netconf") to be invoked
as an SSH subsystem.</p>
<p>3.1.  Capabilities Exchange</p>
<p>As specified in [RFC6241], the NETCONF server indicates its
capabilities by sending an XML document containing a <hello> element
as soon as the NETCONF session is established.  The NETCONF client
can parse this message to determine which NETCONF capabilities are
supported by the NETCONF server.</p>
<p>Wasserman                    Standards Track                    [Page 3]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>As [RFC6241] states, the NETCONF client also sends an XML document
containing a <hello> element to indicate the NETCONF client's
capabilities to the NETCONF server.  The document containing the
<hello> element is the first XML document that the NETCONF client
sends after the NETCONF session is established.</p>
<p>The following example shows a capability exchange.  Data sent by the
NETCONF client are marked with "C:", and data sent by the NETCONF
server are marked with "S:".</p>
<p>S: <?xml version="1.0" encoding="UTF-8"?>
S: <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
S:   <capabilities>
S:     <capability>
S:       urn:ietf:params:netconf:base:1.1
S:     </capability>
S:     <capability>
S:       urn:ietf:params:ns:netconf:capability:startup:1.0
S:     </capability>
S:   </capabilities>
S:   <session-id>4</session-id>
S: </hello>
S: ]]&gt;]]&gt;</p>
<p>C: <?xml version="1.0" encoding="UTF-8"?>
C: <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
C:   <capabilities>
C:     <capability>
C:       urn:ietf:params:netconf:base:1.1
C:     </capability>
C:   </capabilities>
C: </hello>
C: ]]&gt;]]&gt;</p>
<p>Although the example shows the NETCONF server sending a <hello>
message followed by the NETCONF client's <hello> message, both sides
will send the message as soon as the NETCONF subsystem is
initialized, perhaps simultaneously.</p>
<ol start="4">
<li>Using NETCONF over SSH</li>
</ol>
<p>A NETCONF over SSH session consists of a NETCONF client and NETCONF
server exchanging complete XML documents.  Once the session has been
established and capabilities have been exchanged, the NETCONF client
will send complete XML documents containing <rpc> elements to the
server, and the NETCONF server will respond with complete XML
documents containing <rpc-reply> elements.</p>
<p>Wasserman                    Standards Track                    [Page 4]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>4.1.  Framing Protocol</p>
<p>The previous version of this document defined the character sequence
"]]&gt;]]&gt;" as a message separator, under the assumption that it could
not be found in well-formed XML documents.  However, this assumption
is not correct.  It can legally appear in XML attributes, comments,
and processing instructions.  In order to solve this problem, and at
the same time be compatible with existing implementations, this
document defines the following framing protocol.</p>
<p>The <hello> message MUST be followed by the character sequence
]]&gt;]]&gt;.  Upon reception of the <hello> message, the receiving peer's
SSH Transport layer conceptually passes the <hello> message to the
Messages layer.  If the :base:1.1 capability is advertised by both
peers, the chunked framing mechanism (see Section 4.2) is used for
the remainder of the NETCONF session.  Otherwise, the old end-of-
message-based mechanism (see Section 4.3) is used.</p>
<p>4.2.  Chunked Framing Mechanism</p>
<p>This mechanism encodes all NETCONF messages with a chunked framing.
Specifically, the message follows the ABNF [RFC5234] rule Chunked-
Message:</p>
<pre><code>    Chunked-Message = 1*chunk
                      end-of-chunks

    chunk           = LF HASH chunk-size LF
                      chunk-data
    chunk-size      = 1*DIGIT1 0*DIGIT
    chunk-data      = 1*OCTET

    end-of-chunks   = LF HASH HASH LF

    DIGIT1          = %x31-39
    DIGIT           = %x30-39
    HASH            = %x23
    LF              = %x0A
    OCTET           = %x00-FF
</code></pre>
<p>The chunk-size field is a string of decimal digits indicating the
number of octets in chunk-data.  Leading zeros are prohibited, and
the maximum allowed chunk-size value is 4294967295.</p>
<p>Wasserman                    Standards Track                    [Page 5]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>As an example, the message:</p>
<pre><code>   &lt;rpc message-id="102"
        xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
     &lt;close-session/&gt;
   &lt;/rpc&gt;
</code></pre>
<p>could be encoded as (using '\n' as a visible representation of the
LineFeed character):</p>
<p>C:  \n#4\n
C:  &lt;rpc
C:  \n#18\n
C:   message-id="102"\n
C:  \n#79\n
C:       xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;\n
C:    <close-session/>\n
C:  </rpc>
C:  \n##\n</p>
<p>Conceptually, the SSH Transport layer encodes messages sent by the
Messages layer, and decodes messages received on the SSH channel
before passing them to the Messages layer.</p>
<p>The examples for the chunked framing mechanism show all LineFeeds,
even those that are not used as part of the framing mechanism.  Note
that the SSH transport does not interpret the XML content; thus, it
does not care about any optional XML-specific LineFeeds.</p>
<p>In the second and third chunks quoted above, each line is terminated
by a LineFeed.  For all the XML lines (except the last one), this
example treats the LineFeed as part of the chunk-data and so
contributing to the chunk-size.</p>
<p>Note that there is no LineFeed character after the <rpc> end tag in
this message.  The LineFeed required by the start of the end-of-
chunks block immediately follows the last '&gt;' character in the
message.</p>
<p>If the chunk-size and the chunk-size value respectively are invalid
or if an error occurs during the decoding process, the peer MUST
terminate the NETCONF session by closing the corresponding SSH
channel.  Implementations MUST ensure they are not vulnerable for a
buffer overrun.</p>
<p>Wasserman                    Standards Track                    [Page 6]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>4.3.  End-of-Message Framing Mechanism</p>
<p>This mechanism exists for backwards compatibility with
implementations of previous versions of this document.  It is only
used when the remote peer does not advertise a base protocol version
supporting chunked encoding, i.e., a NETCONF implementation only
supporting :base:1.0.</p>
<p>When this mechanism is used, the special character sequence ]]&gt;]]&gt;,
MUST be sent by both the NETCONF client and the NETCONF server after
each message (XML document) in the NETCONF exchange.  Conceptually,
the SSH Transport layer passes any data found in between the ]]&gt;]]&gt;
characters to the Messages layer.</p>
<p>A NETCONF over SSH session, using the backwards-compatible end-of-
message framing to retrieve a set of configuration information, might
look like this:</p>
<p>C: <?xml version="1.0" encoding="UTF-8"?>
C: <rpc message-id="105"
   C: xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
C:   <get-config>
C:     <source><running/></source>
C:     <config xmlns="http://example.com/schema/1.2/config">
C:      <users/>
C:     </config>
C:   </get-config>
C: </rpc>
C: ]]&gt;]]&gt;</p>
<p>S: <?xml version="1.0" encoding="UTF-8"?>
S: <rpc-reply message-id="105"
   S: xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
S:   <config xmlns="http://example.com/schema/1.2/config">
S:     <users>
S:       <user><name>root</name><type>superuser</type></user>
S:       <user><name>fred</name><type>admin</type></user>
S:       <user><name>barney</name><type>admin</type></user>
S:     </users>
S:   </config>
S: </rpc-reply>
S: ]]&gt;]]&gt;</p>
<p>Wasserman                    Standards Track                    [Page 7]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<ol start="5">
<li>Exiting the NETCONF Subsystem</li>
</ol>
<p>Exiting NETCONF is accomplished using the <close-session> operation.
A NETCONF server will process NETCONF messages from the NETCONF
client in the order in which they are received.  When the NETCONF
server processes a <close-session> operation, the NETCONF server
SHALL respond and close the SSH session channel.  The NETCONF server
MUST NOT process any NETCONF messages received after the
<close-session> operation.</p>
<p>To continue the example used in Section 4.2, an existing NETCONF
subsystem session could be closed as follows:</p>
<p>C: \n#140\n
C: <?xml version="1.0" encoding="UTF-8"?>\n
C: &lt;rpc message-id="106"\n
C:      xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;\n
C:   <close-session/>\n
C: </rpc>
C: \n##\n</p>
<p>S: \n#139\n
S: <?xml version="1.0" encoding="UTF-8"?>\n
S: &lt;rpc-reply id="106"\n
S:            xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;\n
S:   <ok/>\n
S: </rpc-reply>
S: \n##\n</p>
<ol start="6">
<li>Security Considerations</li>
</ol>
<p>NETCONF is used to access configuration and state information and to
modify configuration information, so the ability to access this
protocol should be limited to users and systems that are authorized
to view the NETCONF server's configuration and state or to modify the
NETCONF server's configuration.</p>
<p>The identity of the SSH server MUST be verified and authenticated by
the SSH client according to local policy before password-based
authentication data or any configuration or state data is sent to or
received from the SSH server.  The identity of the SSH client MUST
also be verified and authenticated by the SSH server according to
local policy to ensure that the incoming SSH client request is
legitimate before any configuration or state data is sent to or
received from the SSH client.  Neither side should establish a
NETCONF over SSH connection with an unknown, unexpected, or incorrect
identity on the opposite side.</p>
<p>Wasserman                    Standards Track                    [Page 8]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>Configuration or state data may include sensitive information, such
as usernames or security keys.  So, NETCONF requires communications
channels that provide strong encryption for data privacy.  This
document defines a NETCONF over SSH mapping that provides for support
of strong encryption and authentication.</p>
<p>This document requires that SSH servers default to allowing access to
the "netconf" SSH subsystem only when using a specific TCP port
assigned by IANA for this purpose.  This will allow NETCONF over SSH
traffic to be easily identified and filtered by firewalls and other
network nodes.  However, it will also allow NETCONF over SSH traffic
to be more easily identified by attackers.</p>
<p>This document also recommends that SSH servers be configurable to
allow access to the "netconf" SSH subsystem over other ports.  Use of
that configuration option without corresponding changes to firewall
or network device configuration may unintentionally result in the
ability for nodes outside of the firewall or other administrative
boundaries to gain access to the "netconf" SSH subsystem.</p>
<p>RFC 4742 assumes that the end-of-message (EOM) sequence, ]]&gt;]]&gt;,
cannot appear in any well-formed XML document, which turned out to be
mistaken.  The EOM sequence can cause operational problems and open
space for attacks if sent deliberately in RPC messages.  It is
however believed that the associated threat is not very high.  This
document still uses the EOM sequence for the initial <hello> message
to avoid incompatibility with existing implementations.  When both
peers implement base:1.1 capability, a proper framing protocol
(chunked framing mechanism; see Section 4.2) is used for the rest of
the NETCONF session, to avoid injection attacks.</p>
<ol start="7">
<li>IANA Considerations</li>
</ol>
<p>Based on the previous version of this document, RFC 4742, IANA
assigned the TCP port 830 as the default port for NETCONF over SSH
sessions.</p>
<p>IANA had also assigned "netconf" as an SSH Subsystem Name, as defined
in [RFC4250], as follows:</p>
<pre><code>          Subsystem Name                  Reference
          --------------                  ---------
          netconf                         RFC 4742
</code></pre>
<p>IANA updated these allocations to refer to this document.</p>
<p>Wasserman                    Standards Track                    [Page 9]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<ol start="8">
<li>Acknowledgements</li>
</ol>
<p>Ted Goddard was a co-author on earlier versions of this document.</p>
<p>This document was written using the xml2rfc tool described in RFC
2629 [RFC2629].</p>
<p>Extensive input was received from the other members of the NETCONF
design team, including: Andy Bierman, Weijing Chen, Rob Enns, Wes
Hardaker, David Harrington, Eliot Lear, Simon Leinen, Phil Shafer,
Juergen Schoenwaelder, and Steve Waldbusser.  The following people
have also reviewed this document and provided valuable input: Olafur
Gudmundsson, Sam Hartman, Scott Hollenbeck, Bill Sommerfeld, Balazs
Lengyel, Bert Wijnen, Mehmet Ersue, Martin Bjorklund, Lada Lothka,
Kent Watsen, and Tom Petch.</p>
<ol start="9">
<li>References</li>
</ol>
<p>9.1.  Normative References</p>
<p>[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.</p>
<p>[RFC4250]  Lehtinen, S. and C. Lonvick, "The Secure Shell (SSH)
Protocol Assigned Numbers", RFC 4250, January 2006.</p>
<p>[RFC4252]  Ylonen, T. and C. Lonvick, "The Secure Shell (SSH)
Authentication Protocol", RFC 4252, January 2006.</p>
<p>[RFC4253]  Ylonen, T. and C. Lonvick, "The Secure Shell (SSH)
Transport Layer Protocol", RFC 4253, January 2006.</p>
<p>[RFC4254]  Ylonen, T. and C. Lonvick, "The Secure Shell (SSH)
Connection Protocol", RFC 4254, January 2006.</p>
<p>[RFC5234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008.</p>
<p>[RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A.  Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, June 2011.</p>
<p>9.2.  Informative References</p>
<p>[RFC2629]  Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
June 1999.</p>
<p>Wasserman                    Standards Track                   [Page 10]

RFC 6242                    NETCONF over SSH                   June 2011</p>
<p>Appendix A.  Changes from RFC 4742</p>
<p>This section lists major changes between this document and RFC 4742.</p>
<p>o  Introduced the new chunked framing mechanism to solve known
security issues with the EOM framing.</p>
<p>o  Extended text in Security Considerations; added text on EOM
issues.</p>
<p>o  Added examples to show new chunked encoding properly; highlighted
the location of new lines.</p>
<p>o  Added text for NETCONF username handling following the
requirements on usernames in [RFC6241].</p>
<p>o  Changed use of the terms "client/server" and "manager/agent" to
"SSH client/server" and "NETCONF client/server".</p>
<p>o  Consistently used the term "operation", instead of "command" or
"message".</p>
<p>o  Integrated errata verified for RFC 4742 as of the date of
publication of this document.  See errata for RFC 4742 at
http://www.rfc-editor.org.</p>
<p>Author's Address</p>
<p>Margaret Wasserman
Painless Security, LLC
356 Abbott Street
North Andover, MA  01845
USA</p>
<p>Phone: +1 781 405-7464
EMail: mrw@painless-security.com
URI:   http://www.painless-security.com</p>
<p>Wasserman                    Standards Track                   [Page 11]
</p>

                    </main>

                    <nav class="nav-wrapper" aria-label="Page navigation">
                        <!-- Mobile navigation buttons -->
                            <a rel="prev" href="../addons/rfc4742.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
                                <i class="fa fa-angle-left"></i>
                            </a>

                            <a rel="next prefetch" href="../addons/rfc4741.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
                                <i class="fa fa-angle-right"></i>
                            </a>

                        <div style="clear: both"></div>
                    </nav>
                </div>
            </div>

            <nav class="nav-wide-wrapper" aria-label="Page navigation">
                    <a rel="prev" href="../addons/rfc4742.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
                        <i class="fa fa-angle-left"></i>
                    </a>

                    <a rel="next prefetch" href="../addons/rfc4741.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
                        <i class="fa fa-angle-right"></i>
                    </a>
            </nav>

        </div>

        <!-- Livereload script (if served using the cli tool) -->
        <script>
            const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
            const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
            const socket = new WebSocket(wsAddress);
            socket.onmessage = function (event) {
                if (event.data === "reload") {
                    socket.close();
                    location.reload();
                }
            };

            window.onbeforeunload = function() {
                socket.close();
            }
        </script>



        <script>
            window.playground_copyable = true;
        </script>


        <script src="../elasticlunr.min.js"></script>
        <script src="../mark.min.js"></script>
        <script src="../searcher.js"></script>

        <script src="../clipboard.min.js"></script>
        <script src="../highlight.js"></script>
        <script src="../book.js"></script>

        <!-- Custom JS scripts -->


    </div>
    </body>
</html>
